package com.leeon.exception.exmaples;

public class Example5 {

    public static void main(String[] args) {
        int[] ia = new int[5];
        int index = 10;
        while (true){
            try {
                ia[index] = 1;
                break;
            }catch (ArrayIndexOutOfBoundsException e){
                System.out.printf("caught ArrayIndexOutOfBoundsException");
                e.printStackTrace(System.out);
                index--;
            }finally {
                System.out.printf("are we don yet");
            }
        }

        System.out.printf("end");
    }

}
